//
//  OPMainNavigationController.m
//  NewWorld
//
//  Created by 飞奔的羊 on 16/4/27.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "OPMainNavigationController.h"

@interface OPMainNavigationController ()

@end

@implementation OPMainNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self.navigationBar setBarTintColor:[UIColor colorWithRed:18/255.0 green:113/255.0 blue:213/255.0 alpha:1]];

}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
 {
 // push的时候会隐藏底部的tab bar。
 if (self.viewControllers.count > 0) { // 如果现在push的不是栈底控制器(最先push进来的那个控制器)
 
 viewController.hidesBottomBarWhenPushed = YES;
 }
 
 [super pushViewController:viewController animated:animated];
 }


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
